package com.smart.campus.controller;

import com.smart.campus.dto.SecurityGuard;
import com.smart.campus.interfaces.SecurityGuardApi;
import com.smart.campus.pojo.PagedResponse;
import com.smart.campus.service.SecurityGuardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: smart-campus
 * @BelongsPackage: com.smart.campus.controller
 * @Author: Y S Z
 * @CreateTime: 2024-10-07  11:56
 * @Description: TODO
 * @Version: 1.0
 */

@RestController
public class SecurityGuardController implements SecurityGuardApi {
    @Autowired
    private SecurityGuardService securityGuardService;


    @Override
    public List<SecurityGuard> findSecurityGuardList() {
        return securityGuardService.findSecurityGuardList();
    }

    @Override
    public PagedResponse<SecurityGuard> pageSecurityGuard(SecurityGuard securityGuard, Integer pageNum, Integer pageSize) {
        return securityGuardService.pageSecurityGuard(securityGuard, pageNum, pageSize);
    }

    @Override
    public void addSecurityGuard(SecurityGuard securityGuard) {
        securityGuardService.addSecurityGuard(securityGuard);
    }

    @Override
    public void delSecurityGuard(Long id) {
        securityGuardService.delSecurityGuard(id);
    }

    @Override
    public SecurityGuard findSecurityGuardById(Long id) {
        return securityGuardService.findSecurityGuardById(id);
    }

    @Override
    public void updSecurityGuard(SecurityGuard securityGuard) {
        securityGuardService.updSecurityGuard(securityGuard);
    }
}
